package com.qf.service.impl;

import com.qf.bean.Menu;
import com.qf.bean.Role;
import com.qf.dao.MenuDao;
import com.qf.dao.RoleDao;
import com.qf.service.ManyToManyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.persistence.ManyToMany;
import java.util.List;

/**
 * IntelliJ IDEA -> springdata
 * 2019/12/2 16:40
 *
 * @author zmyao
 * 别看，我是渣渣。
 */
@Service("manyservice")
public class ManyToManyServiceImpl implements ManyToManyService {
   @Autowired
   private RoleDao roleDao;
   @Autowired
   private MenuDao menuDao;
    @Override
    public List<Role> findRoles() {
        return roleDao.findAll();
    }

    @Override
    public List<Menu> findMenus() {
        return menuDao.findAll();
    }
}
